interface Person{
  name:string;
  age:number;
  [k:string]:string|number
}

const jack:Person={
  name: "jack",
  age: 0
}

const tom:Person={
  name:"tom"
}

interface User{
  readonly name:string;
  age:number
}

const lily:User={
  name:"lily",
  age:12
}

lily.name='lucy';
const mark:Person={
  name:'jack',
  age:20,
  gender:'男'
}

const add=(x:number,y:number):number=>{
  return x+y
}

interface Sum{
  (x:number,y:number):number
}

const sum:Sum=(x,y)=>{
  return x+y
}

type Sum1=(x:number,y:number)=>number

const sum1:Sum1=(x,y)=>{
  return x+y
}


interface Age{
  age:number;
}

interface Student extends Age{
  name:string;
  gender:'男'|'女'
}

const student:Student={
  name:'jack',
  gender:'女',
  age:11
}

interface Student{
  score?:number
}

const student1:Student={
  name: "",
  gender: "男",
  age: 0,
  score:100
}

type Girl={
  name:string;
  gender:'男'|'女'
}

const girl:Girl&Age={
  name:'girl',
  gender:'女',
  age:11
} 
